<script setup lang="ts">
import { IActionParam, ILayoutOpts, IParam } from "@core";

interface FormButtonProps{
  name: string;
  layoutOpts: ILayoutOpts;
  visible?: boolean;
  iconClass?: string;
  imgPath?: string;
  showCaption?: boolean;
  labelCssName?: string;
  caption: string
}
const props = withDefaults(defineProps<FormButtonProps>(), {
  visible: true,
  showCaption: true,
});

</script>

<template>
  <AppCol :visible="visible" noRoot :layoutOpts="layoutOpts" class="app-formButton">
    <template #default="{slotStyle, slotClass}">
      <a-button 
        :class="slotClass"
        :style="slotStyle"
        type="primary">
          <AppIconText :class="labelCssName" :iconClass="iconClass" :imgPath="imagePath" :text="showCaption ? caption : '' "/>
      </a-button>
    </template>
  </AppCol>
</template>

<style lang="scss">
</style>